< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03020104.xhp

(section: reset) (bookmark: bm_id3154141)
Reset statement

Reset ステートメント

Reset Statement [Runtime]
Reset ステートメント [実行時](hd_id3154141.1)

Closes all open files and writes the contents of all file buffers to the harddisk.
オープンしてあるすべてのファイルをクローズして、ファイルバッファの内容をハードディスクに書き込みます。(par_id3156423.2)

(/section: reset)

Syntax:
構文:(hd_id3154124.3)

Reset
Reset (par_id3156281.4)

Example:
例:(hd_id3161831.5)

Sub ExampleReset
Sub ExampleReset(par_id3151113.37)

On Error Goto ErrorHandler
On Error Goto ErrorHandler(par_id3148575.38)

Dim iNumber As Integer
Dim iNumber As Integer(par_id3153093.39)

Dim iCount As Integer
Dim iCount As Integer(par_id3150011.40)

Dim sLine As String
Dim sLine As String(par_id3153363.41)

Dim aFile As String
Dim aFile As String(par_id3154320.42)

aFile = "c:\data.txt"
aFile = "c:\data.txt"(par_id3163712.43)

iNumber = Freefile
iNumber = Freefile(par_id3146121.45)

Open aFile For Output As #iNumber
Open aFile For Output As #iNumber(par_id3154491.46)

Print #iNumber, "This is a new line of text"
Print #iNumber, "This is a new line of text"(par_id3148455.47)

Close #iNumber
Close #iNumber(par_id3145646.48)

iNumber = Freefile
iNumber = Freefile(par_id3149410.50)

Open aFile For Input As iNumber
Open aFile For Input As iNumber(par_id3147126.51)

For iCount = 1 to 5
For iCount = 1 to 5(par_id3154510.52)

Line Input #iNumber, sLine
Line Input #iNumber, sLine(par_id3146971.53)

If sLine <>"" then
If sLine <>"" then(par_id3156277.54)

rem
Rem(par_id3153707.55)

end if
end if(par_id3150322.56)

Next iCount
Next iCount(par_id3148405.57)

Close #iNumber
Close #iNumber(par_id3153711.58)

Exit Sub
Exit Sub(par_id3156382.59)

ErrorHandler:
ErrorHandler:(par_id3159264.60)

Reset
Reset (par_id3145147.61)

MsgBox "All files will be closed",0,"Error"
MsgBox "All files will be closed",0,"Error"(par_id3163805.62)

End Sub
End Sub(par_id3147364.63)


< Prev / Next >